package edu.sctu.xialei.May.day20150512one;

/**
 * Created by Administrator on 2015/5/13 0013.
 */
public class DissectionStudentGradeAndSex {

    public void countingGradeAndSex(StudentData []datas){

        int number_Behave60 = 0;

        for (int i = 0; i < datas.length; i++) {

            if(( datas[i].grade > 60 ) && ( datas[i].sex.equals("男生") ) ){
                number_Behave60 ++;
            }
        }
        System.out.println(number_Behave60);
    }

    public void printing_Behave60(StudentData []datas){

        for (int i = 0; i < datas.length; i++) {

            if(datas[i].grade > 60 && ( datas[i].sex.equals("男生") ) ){
                System.out.println(datas[i].name + " 是 " + datas[i].sex + "   成绩是： " + datas[i].grade);
            }
        }
    }

}
